<!DOCTYPE html>
<html>
	<head>
	    <meta charset="utf-8">
	    <title>文件比较</title>
	    
	    <link rel="stylesheet" media="all" href="../plugings/mergely/lib/codemirror.css" />
	    <link rel="stylesheet" media="all" href="../plugings/mergely/lib/mergely.css" />
	    
	    <style>
			/*html,body{
				margin: 0;
				padding: 0;
			}
			fieldset{
				width: 500px;
				margin: 20px auto;
				display: inline;
				vertical-align: top;
			}
			.docCla {
				text-align: left;
			}*/
	    </style>
	</head>
	
	<body>
		<div id="mergely" style="margin-left: 35px;"></div>
	</body>
	
	<script type="text/javascript" src="../js/jquery-1.11.0.min.js" ></script>
	<script type="text/javascript" src="../plugings/mergely/lib/codemirror.min.js" ></script>
	<script type="text/javascript" src="../plugings/mergely/lib/searchcursor.js" ></script>
	<script type="text/javascript" src="../plugings/mergely/lib/mergely.js" ></script>
	
	<script>
		$(function() {
			var currentContent = parent.editor.getValue();
			var readFileContent = parent.readFileContent;
			
			$('#mergely').mergely({
		        lhs: function(setValue) {
		            setValue(currentContent);
		        },
		        rhs: function(setValue) {
		            setValue(readFileContent);
		        }
			});
			
			setTimeout(function() {
				$("#mergely").mergely('options', { line_numbers: true });
				$("#mergely").mergely('cm', 'lhs').setSize('750px','850px');
		    	$("#mergely").mergely('cm', 'rhs').setSize('750px','850px');
			}, 1000);
		});
	</script>
	
</html>